package org.hertsig.entities;

import java.util.EnumSet;

import lombok.Getter;


public enum SuperType {
	Basic(CardType.Land),
	Legendary(CardType.Artifact, CardType.Creature, CardType.Enchantment, CardType.Land),
	Snow(CardType.Artifact, CardType.Creature, CardType.Enchantment, CardType.Land),
	Tribal(CardType.Artifact, CardType.Enchantment, CardType.Instant, CardType.Sorcery),
	World(CardType.Enchantment),
	Ongoing(CardType.Scheme)
	;
	
	@Getter private final EnumSet<CardType> allowed;
	
	private SuperType(CardType first, CardType... rest) {
		allowed = EnumSet.of(first, rest);
	}
	
	public boolean isAllowed(CardType type) {
		return allowed.contains(type);
	}
}
